# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=dleyna-server
pkgver=0.7.0+7+gba10c13
pkgrel=1
pkgdesc="Library to discover, browse and manipulate Digital Media Servers"
url="https://github.com/phako/dleyna-server"
arch=(x86_64)
license=(LGPL2.1)
depends=(dleyna-connector-dbus gupnp-av gupnp-dlna libsoup)
makedepends=(git meson)
_commit=ba10c13702374725e5c442ca47bee6a1aea4624c  # master
source=("git+https://github.com/phako/dleyna-server#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  meson install -C build --destdir "$pkgdir"
}
